<?php
/**
 * Template Name:create_huazhuang
 * 
 * @name 生成化妆栏目静态页面
 * 
 * 化妆：
 *  1：流行化妆
 *  2：流行彩妆
 *  3：化妆技巧
 *  4：彩妆技巧
 *  5:化妆品网友最爱
 */

$smarty = smarty_get_instance ();

//化妆栏目分类ID
$hua_catid = 5;

//第一行第一列_幻灯片
$first_first = catid_article(123,$hua_catid,3);

//第一行第二列_最新更新
$first_second = catid_article(124,$hua_catid,1);

//第一行第三列右边两条数据_化妆推荐
$first_third_right = catid_article(125,$hua_catid,8);

//第一行第三列左边一条数据_化妆推荐
$first_third_left = catid_article(126,$hua_catid,4);

//第二行 左半部分图片部分:流行化妆
$second_left = subcatid(137,$hua_catid,3,6);

//第二行 右半部分 文章列表：流行化妆
$second_right = subcatid(138,$hua_catid,4,6);

//第三行 右半部分图片部分:流行彩妆
$third_right = subcatid(137,$hua_catid,3,2);

//第三行 左半部分 文章列表：流行彩妆
$third_left = subcatid(138,$hua_catid,4,2);

//第四行 左半部分图片部分:化妆技巧
$forth_left = subcatid(137,$hua_catid,3,3);

//第四行 右半部分 文章列表：化妆技巧
$forth_right = subcatid(138,$hua_catid,4,3);

//第五行 右半部分图片部分彩妆技巧
$fifth_right = subcatid(137,$hua_catid,3,4);

//第五行 左半部分 文章列表：彩妆技巧
$fifth_left = subcatid(138,$hua_catid,4,4);

//第六行：化妆图库  左半部分 图片
$sixth_left = catid_article(137,$hua_catid,3);

//第六行：化妆图库  右半部分列表
$sixth_right = catid_article(138,$hua_catid,4);

//第七行 第一列： 化妆技巧最热文章
$seventh_first = subcatid(138,$hua_catid,1,3);
//第七行 第二列 ：彩妆技巧最热文章
$seventh_second = subcatid(138,$hua_catid,1,4);
//第七行 第三列 ：化妆品网友最爱
$seventh_third = subcatid(138,$hua_catid,1,5);

$smarty->assign ( "first_first",$first_first);
$smarty->assign ( "first_second",$first_second);
$smarty->assign ( "first_third_right",$first_third_right);
$smarty->assign ( "first_third_left",$first_third_left);
$smarty->assign ( "second_left",$second_left);
$smarty->assign ( "second_right",$second_right);
$smarty->assign ( "third_left",$third_left);
$smarty->assign ( "third_right",$third_right);
$smarty->assign ( "forth_left",$forth_left);
$smarty->assign ( "forth_right",$forth_right);
$smarty->assign ( "fifth_left",$fifth_left);
$smarty->assign ( "fifth_right",$fifth_right);
$smarty->assign ( "sixth_left",$sixth_left);
$smarty->assign ( "sixth_right",$sixth_right);
$smarty->assign ( "seventh_first",$seventh_first);
$smarty->assign ( "seventh_second",$seventh_second);
$smarty->assign ( "seventh_third",$seventh_third);

$content = $smarty->fetch ( "huazhuang.tpl" );
$fp = fopen ( "/home/admin/tueye/wordpress/wp-content/themes/tueye/huazhuang.html", "w" );
fwrite ( $fp, $content );
fclose ( $fp );
?>